package vip.bblog.user.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import vip.bblog.common.entity.BaseEntity;
import vip.bblog.common.utils.valid.Default;
import vip.bblog.common.utils.valid.Delete;
import vip.bblog.common.utils.valid.Update;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * <p>
 * QQ用户基本信息表
 * </p>
 *
 * @author yuyong
 * @since 2019-04-28
 */
public class BlogQqUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * qq用户唯一标识
     */
    @NotBlank(message = "用户openid不能为空", groups = {Update.class, Delete.class})
    @TableId(type = IdType.INPUT)
    private String openid;

    /**
     * 用户在QQ空间的昵称。
     */
    @NotBlank(message = "QQ昵称", groups = Default.class)
    private String nickname;

    /**
     * 地区
     */
    private String area;

    /**
     * 大小为40×40像素的QQ头像URL。
     */
    @TableField("figureurl_qq_1")
    private String figureurlQq1;

    /**
     * 性别
     */
    private String gender;

    /**
     * 0:禁用，1:正常
     */
    private Integer status;

    /**
     * 最近更新时间
     */
    private LocalDateTime updateTime;

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }
    public String getFigureurlQq1() {
        return figureurlQq1;
    }

    public void setFigureurlQq1(String figureurlQq1) {
        this.figureurlQq1 = figureurlQq1;
    }
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "BlogQqUser{" +
        "openid=" + openid +
        ", nickname=" + nickname +
        ", area=" + area +
        ", figureurlQq1=" + figureurlQq1 +
        ", gender=" + gender +
        ", status=" + status +
        ", updateTime=" + updateTime +
        "}";
    }
}
